package may.qf.service.impl;

import may.qf.entity.Dept;
import may.qf.mapper.DeptMapper;
import may.qf.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DeptServiceImpl implements DeptService {
    @Autowired
    private DeptMapper deptMapper;

    @Override
    public List<Dept> queryAll() {
        return deptMapper.queryAll();
    }

    @Override
    public int addDept(Dept dept) {
        return deptMapper.addDept(dept);
    }

    @Override
    public int updateDept(Dept dept) {
        return deptMapper.updateDept(dept);
    }

    @Override
    public int delDept(Integer deptNo) {
        return deptMapper.delDept(deptNo);
    }

    @Override
    public Dept queryDeptByDeptNo(Integer deptNo) {
        return deptMapper.queryDeptByDeptNo(deptNo);
    }
}
